package com.ctshk.sapp.scenic.controller;

import com.ctshk.common.annotations.OperationLogAnnotation;
import com.ctshk.common.dto.Result;
import com.ctshk.common.enums.OperationLogModel;
import com.ctshk.common.enums.OperationLogType;
import com.ctshk.rpc.scenic.req.ScenicProductBatchSaleStrategyReq;
import com.ctshk.rpc.scenic.req.ScenicSupplierApiSettingReq;
import com.ctshk.rpc.scenic.service.IScenicInitializationSettingsService;
import com.ctshk.rpc.scenic.service.IScenicReservationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import com.ctshk.common.web.support.BaseController;

/**
 * <p>
 * 门票api初始化设置表 前端控制器
 * </p>
 *
 * @author 谢诗宏
 * @since 2021-02-25
 */
@Api(value="景点门票API初始设置", tags="景点门票API初始设置")
@RestController
@RequestMapping("/scenic-initialization-settings")
public class ScenicInitializationSettingsController extends BaseController {
    @DubboReference
    private IScenicInitializationSettingsService iScenicInitializationSettingsService;

    @ApiOperation(value="景点门票API初始设置", notes="")
    @OperationLogAnnotation(operModul = OperationLogModel.TICKET, operType = OperationLogType.ADD, operTitle = "景点门票API初始设置", operDesc = "景点门票API初始设置")
    @PostMapping("/apiSetUp")
    public Result apiSetUp(@RequestBody ScenicSupplierApiSettingReq settingReq){
        return  iScenicInitializationSettingsService.apiSetUp(settingReq,getCurrentUser(getRequest()));
    }
}
